﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit|ie-stand|ie-comp" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>调节音量大小</title>
    <style>
        progress {
            display: inline-block;
            width: 160px;
            height: 20px;
            border: 1px solid #0064B4;
            background-color: #e6e6e6;
            color: #0064B4; /*IE10*/
        }
            /*ie6-ie9*/
            progress ie {
                display: block;
                height: 100%;
                background: #0064B4;
            }

            progress::-moz-progress-bar {
                background: #0064B4;
            }

            progress::-webkit-progress-bar {
                background: #e6e6e6;
            }

            progress::-webkit-progress-value {
                background: #0064B4;
            }

        .control {
            border: 1px solid #3c3c3c;
            padding: 0 6px;
        }
    </style>
</head>
<body>
    <span class="control">-</span>
    <progress max="100" value="20"><ie style="width:20%;"></ie></progress>
    <span class="control">+</span>
    <p>
        <input type="hidden" class="single-slider" value="23" />
    </p>
    <script src="//js.lzlcdn.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <link rel="stylesheet" href="//css.lzlcdn.com/js/jRange/jquery.range.css">
    <script src="//js.lzlcdn.com/js/jRange/jquery.range.js"></script>
    <script>
        $(function () {
            var progress = $('progress');
            $.post('/voice/current', function (data) {
                progress.val(data.data);
            });
            $('.single-slider').jRange({
                from: 0,
                to: 100,
                step: 1,
                scale: [0, 100],
                format: '%s',
                width: 300,
                showLabels: true,
                theme:"theme-blue",
                snap: true
            });
            $('.control').click(function () {
                var self = $(this);
                $.post('/voice/change', { action: self.text() }, function (data) {
                    progress.val(data.data);
                });
            });
        });
    </script>
</body>
</html>
